/*
 * HalThread.h
 *
 *  Created on: 28-10-2011
 *      Author: cristian
 */

#ifndef HALTHREAD_H_
#define HALTHREAD_H_
#include <pthread.h>
#include "HalSocket.h"

class HalThread: public HalSocket {
protected:
	pthread_t* thread;
	pthread_attr_t* attr;
	bool run;
	pthread_mutex_t mutex;
public:
	HalThread();
	virtual ~HalThread();
	pthread_attr_t *getAttr() const;

	pthread_t *getThread() const;
	void setAttr(pthread_attr_t *attr);
	void setThread(pthread_t *thread);
	bool isRun() const;
	void setRun(bool run);
};

#endif /* HALTHREAD_H_ */
